<template>
  <!-- 头部 -->
  <div class="simple-header">
    <i class="iconfont" @click="goback">&#xe603;</i>
    <!-- <i v-else>&nbsp;&nbsp;&nbsp;&nbsp;</i> -->
    <div class="simple-header-name">{{ name }}</div>
    <i class="iconfont">&#xe61f;</i>
  </div>
</template>

<script>
import { useRouter } from "vue-router";
export default {
  props: {
    name: {
      type: String,
      default: "",
    },
    back: {
      type: Boolean,
      default: true,
    }
  },
  setup(props) {
      const route = useRouter();
      const goback = () => {
        console.log("点击了返回");
        route.go(-1);
      };
      return {
        goback,
      };
    },
};
</script>
<style scoped>
.simple-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  line-height: 1.8773rem;
  padding: 0 .4267rem;
  color: #252525;
  background: #fff;
  border-bottom: .0427rem solid #dcdcdc;
  width: 100%;
  height: 1.8773rem;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
}
.simple-header-name {
  font-size: .5973rem;
}
</style>
